package edu.sctu.zhu.dao;

import edu.sctu.zhu.bean.Goods;
import edu.sctu.zhu.bean.Image;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by zhu on 2015/11/24.
 */
@Repository
public interface ImageDao extends CrudRepository<Image,Long>{
    @Query(value = "select * from image where parent_id=?",nativeQuery = true)
    public List<Image> findByparentId(Long id);
}
